package com.coffee.sku.service.sku.dao;

import com.coffee.sku.api.sku.query.SkuQuery;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.service.sku.bean.Sku;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SkuDao {
    public Sku findById(Integer id);

    public Sku findByIdAndDelete(Integer id);

    public Sku findByCategoryId(@Param("categoryId") String categoryId);

    public Sku findByIdForUpdate(Integer id);

    public List<Sku> findByIds(@Param("idList") List<Integer> idList);

    public Integer count(@Param("param") SkuQuery param);

    public List<Sku> page(@Param("param") SkuQuery param, @Param("offset") Integer offset, @Param("rows") Integer rows);

    public List<Sku> list(@Param("param") SkuQuery param);

    public Sku findFirst(@Param("param") SkuQuery param);

    public Integer insert(Sku param);

    Integer insertBatch(List<Sku> list);

    public void updateById(@Param("param") Sku param);

    public Integer deleteById(Integer id);

    public Integer deleteByIds(List<Integer> idList);

    public List<String> getCategoryPidPaths();


}